package com.mojian.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.time.LocalDateTime;
import java.io.Serializable;

@Data
@TableName("points_record")
@ApiModel(value = "积分记录对象")
public class PointsRecord implements Serializable {

    @TableId(type = IdType.AUTO)
    @ApiModelProperty(value = "主键")
    private Long id;

    @ApiModelProperty(value = "用户ID")
    private Long userId;

    @ApiModelProperty(value = "积分变动")
    private Integer points;

    @ApiModelProperty(value = "变动后余额")
    private Integer balance;

    @ApiModelProperty(value = "变动类型：1-签到，2-上传资源，3-下载资源，4-发表文章，5-评论，6-回复，7-点赞")
    private Integer type;

    @ApiModelProperty(value = "关联ID")
    private Long relatedId;

    @ApiModelProperty(value = "描述")
    private String description;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;
} 